package com.vcg.comment.support.clean.data;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

/**
 * Created by wuyu on 2016/5/31.
 */
public class YunCleanJsonData {

    private String id;
    private String relation_id;
    private String ip;
    private String user_id;
    private String publish_date;
    private JSONArray contents = new JSONArray();

    public YunCleanJsonData addContent(String type, String content, int master) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("type", type);
        jsonObject.put("content", content);
        jsonObject.put("master", master);
        contents.add(jsonObject);
        return this;
    }

    public JSONArray getContents() {
        return contents;
    }

    public void setContents(JSONArray contents) {
        this.contents = contents;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getPublish_date() {
        return publish_date;
    }

    public void setPublish_date(String publish_date) {
        this.publish_date = publish_date;
    }

    public String getRelation_id() {
        return relation_id;
    }

    public void setRelation_id(String relation_id) {
        this.relation_id = relation_id;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}

